package com.google.code.fluentjoiner;

import com.google.common.base.Function;
import com.google.common.collect.Iterators;
import java.util.Iterator;

public class IteratorFunctions
{
    public static Function<Iterator<?>, Integer> count()
    {
        return new Function<Iterator<?>, Integer>()
        {
            @Override
            public Integer apply(final Iterator<?> from)
            {
                return Iterators.size(from);
            }
        };
    }
}
